﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ADONETDataServicesExtension.Utils;

namespace ADONETDataServicesExtension
{
    public static class RequestTargetKind
    {
        internal const string FrameworkTypeName = "System.Data.Services.RequestTargetKind";

        public static readonly int Batch;
        public static readonly int ComplexObject;
        public static readonly int Link;
        public static readonly int Metadata;
        public static readonly int PrimitiveValue;
        public static readonly int Resource;
        public static readonly int ServiceDirectory;
        public static readonly int VoidServiceOperation;

        static RequestTargetKind()
        {
            Batch = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("Batch");
            ComplexObject = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("ComplexObject");
            Link = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("Link");
            Metadata = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("Metadata");
            PrimitiveValue = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("PrimitiveValue");
            Resource = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("Resource");
            ServiceDirectory = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("ServiceDirectory");
            VoidServiceOperation = ReflectionHelper.GetFrameworkType(FrameworkTypeName).GetEnumValueFromName("VoidServiceOperation");
        }
    }
}
